<?php
class test{
  function select(){
}
}
 $aa = new test();
$aa->select();
exit;

$request = "s=/aa/bb?ss=dd";
$request = preg_replace("/\?.*/i", '', $request);
$request_list = explode('/',$request);
print_r($request_list);exit;

print_r(json_encode($_SERVER,true));exit;
/*class feiyifandian{
    function __construct()
    {
        var_dump("remaojin");
    }

    private function lajiaochaorou(){
        echo "good";
    }
    public function mapodoufu(){
        $this->lajiaochaorou();
    }
}

$fandian = new feiyifandian();
$fandian->mapodoufu();*/

//文件上传
/*print_r($_FILES);
$result = file_exists("./aa.jpg");
move_uploaded_file($_FILES['file']['tmp_name'],"./aa.jpg");*/


//redis操作

//key-value结构
//键值对，a为键 1为值
/*$list = [
    "a"=>1,
    "b"=>2
];
foreach ($list as $key=>$value){
    echo $key."  ".$value;exit;
}*/

//设置一个有效期为30秒的key-value结构的数据
/*$redis = new Redis();
$redis->connect("127.0.0.1");
$redis->set(100,"malaxiaoguo",300);
$value = $redis->get(100);
print_r($value);
$redis->del(100);*/

/*$redis = new Redis();
$redis->connect("127.0.0.1");
//$redis->hSet("1","2",3);
//$redis->hGet("1","2");
$list = $redis->hKeys("1");
print_r($list);*/

//时间转换
//$now = time();
//$now_date = date("Y-m-d H:i:s",$now);
//var_dump($now_date);

$mysql = new PDO('mysql:host=localhost;dbname=test','root','123456');
$count = $mysql->query("select * from user")->rowCount();
print_r($count);

